<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>分页查询</title>
</head>
<body>
<table>
    <tr>
        <td>学号</td>
        <td>姓名</td>
        <td>性别</td>
        <td>出生日期</td>
        <td>邮箱</td>
        <td>备注</td>
    </tr>
    <%
        Cookie[] cookie = request.getCookies();
        int e = 0;
        for (Cookie cookie1 : cookie) {
            if (cookie1.getName().equals("yeshu")) {
                if (cookie1.getValue().equals("0")) {
                    e = 1;
                } else {
                    e = (Integer.parseInt(cookie1.getValue()) / 5 + 1);
                }
            }
        }
        int s = e;
        List<Object[]> list = (List<Object[]>) session.getAttribute("NumericalValue");
        for (Object[] objects : list) {
    %>
    <tr>
        <td><%=objects[1]%>
        </td>
        <td><%=objects[2]%>
        </td>
        <td><%=objects[3]%>
        </td>
        <td><%=objects[4]%>
        </td>
        <td><%=objects[5]%>
        </td>
        <td><%=objects[6]%>
        </td>
    </tr>
    <%
        }
    %>
    <tr>
        <td>页数:<%=s%>
        </td>
    </tr>
    <tr>
        <form action="pagingQueryServlet" method="post" name="pagingQuery">
            <input type="submit" name="previousPage" value="上一页">
            <input type="submit" name="pextPage" value="下一页"/>
        </form>
    </tr>

</table>
<form action="student" name="app" method="post">
    <input type="submit" name="add" value="增加"/>
    <input type="submit" name="delete" value="删除"/>
    <input type="submit" name="update" value="修改"/>
</form>
</body>
</html>
